#ifndef VENUS_UI_CONTROLLERS_FRESNEL_EFFECT_CTRL_H
#define VENUS_UI_CONTROLLERS_FRESNEL_EFFECT_CTRL_H

#include "effect_ctrl.h"

namespace venus {
class FresnelEffect;
class FresnelEffectCtrlGlut : public EffectCtrlGlut {
 public:
  FresnelEffectCtrlGlut(FresnelEffect *effect,
                        ScalarCtrlTriple eta_ratio,
                        ScalarCtrlTriple fresnel_bias,
                        ScalarCtrlTriple fresnel_scale,
                        ScalarCtrlTriple fresnel_power)
      : effect_(effect), eta_ratio_(eta_ratio), fresnel_bias_(fresnel_bias),
        fresnel_scale_(fresnel_scale), fresnel_power_(fresnel_power) { }
  ~FresnelEffectCtrlGlut();
  /*
   * the following methods return true, if the relevant event is handled,
   * return false otherwise, comment method to use default implementation
   */
  virtual bool OnKeyboard(unsigned char key, int x, int y);
  //virtual bool OnSpecialKey(int key, int x, int y);
  //virtual bool OnMouse(int button, int state, int x, int y);
  virtual const Effect *effect() const;
 private:
  bool inc_eta_ratio();
  bool dec_eta_ratio();
  bool inc_fresnel_bias();
  bool dec_fresnel_bias();
  bool inc_fresnel_scale();
  bool dec_fresnel_scale();
  bool inc_fresnel_power();
  bool dec_fresnel_power();
 private:
  FresnelEffect *effect_;
  ScalarCtrlTriple eta_ratio_;
  ScalarCtrlTriple fresnel_scale_;
  ScalarCtrlTriple fresnel_power_;
  ScalarCtrlTriple fresnel_bias_;
};
} // namespace venus

#endif // VENUS_UI_CONTROLLERS_FRESNEL_EFFECT_CTRL_H
